import type { FormRules } from 'naive-ui'

export const createRules = (): FormRules => {
  return {
    role: [
      {
        required: true,
        type: 'array',
        message: '请选择角色',
        trigger: 'blur',
      },
    ],
    password: [
      {
        required: true,
        message: '请输入密码',
        trigger: 'blur',
      },
    ],
    avatar: [
      {
        required: true,
        message: '请上传头像',
        trigger: 'blur',
      },
    ],
    nickname: [
      {
        required: true,
        message: '请输入昵称',
        trigger: 'blur',
      },
    ],
    username: [
      {
        required: true,
        message: '请输入用户名',
        trigger: 'blur',
      },
    ],
    name: [
      {
        required: true,
        message: '请输入姓名',
        trigger: 'blur',
      },
    ],
    phone: [
      {
        required: true,
        message: '请输入手机号',
        trigger: 'blur',
      },
    ],
  }
}
